home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / OpenGL 1.0 SDK / Documentation / specular_vector.txt < prev    next >
Encoding:
Text File  |  1999-05-18  |  3.1 KB  |  122 lines  |  [TEXT/ttxt]

  1. * Bob Beretta
  2. * Apple Computer
  3. * beretta@apple.com
  4. * 408-974-1051
  5.  
  6. 000000000011111111112222222222333333333344444444445555555555666666666677777777778888888888999999999900000000001111111111222222222233
  7.  
  8. XXX - Not complete yet!!!
  9.  
  10. Name
  11.  
  12.     APPLE_specular_vector
  13.  
  14. Name Strings
  15.  
  16.     GL_APPLE_specular_vector
  17.  
  18. Version
  19.  
  20.     $Date: 1998/09/13 08:18:20 $ $Revision: 1.0 $
  21.  
  22. Number
  23.  
  24.     159
  25.  
  26. Dependencies
  27.  
  28.     None
  29.  
  30. Overview
  31.  
  32.     An alternative specular lighting model is enabled by passing
  33.     the LIGHT_MODEL_SPECULAR_VECTOR token as the <pname> parameter
  34.     to LightModel, and TRUE as the <param> parameter.  The specular
  35.     vector lighting model calculates the specular intensity as the
  36.     dot product of the true reflection vector of the light source
  37.     and the vector from the vertex to the viewpoint.  This yields
  38.     results that are visually similar to but often more realistic
  39.     than the existing lighting model.  
  40.  
  41.     Mathematically, the specular component s.n in the existing
  42.     lighting model calculation is replaced with the following
  43.     alternative calculation.
  44.  
  45.     Given three vectors, n, l, and p, where n is the unit normal
  46.     vector at the vertex, l is the unit vector from the vertex to
  47.     the light position, and p is the unit vector from the vertex
  48.     to the viewpoint (or the vector {0,0,1} if
  49.     LIGHT_MODEL_LOCAL_VIEWER is false), the specular component is
  50.     given by
  51.  
  52.       (2 * cross(n, cross(n, l)) + l) . p
  53.  
  54.     All other lighting model and material parameters (shininess,
  55.     spotlight, attenuation, local viewer, and direction/positional
  56.     sources) operate normally.  The specular vector lighting model
  57.     affects both rgba and index modes.   
  58.  
  59. New Procedures and Functions
  60.  
  61.     None
  62.  
  63. New Tokens
  64.  
  65.     Accepted by the <pname> parameters of LightModelf, LightModeli,
  66.     LightModelfv, LightModeliv, GetBooleanv, GetDoublev, GetFloatv
  67.     and GetIntegerv :
  68.  
  69.     LIGHT_MODEL_SPECULAR_VECTOR_APPLE           0x85B0
  70.  
  71. Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
  72.  
  73.     XXX - Not complete yet!!!
  74.  
  75.    Section 2.13.1, Lighting
  76.           Table 2.7 should be appended to include:
  77.           "S_bs   boolean   FALSE   use specular vector lighting model"
  78.  
  79.       Equations 2.2 and 2.3 should be updated to reflect the modified
  80.       h_i terms in the specular component, as described above.
  81.  
  82.     Section 2.13.2, Lighting Parameter Specification
  83.           Table 2.8 should be appended to include:
  84.           "S_bs   LIGHT_MODEL_SPECULAR_VECTOR   1"
  85.  
  86. Additions to Chapter 3 of the 1.1 Specification (Rasterization)
  87.  
  88.     None
  89.  
  90. Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
  91. and the Frame Buffer)
  92.  
  93.     None
  94.  
  95. Additions to Chapter 5 of the 1.1 Specification (Special Functions)
  96.  
  97.     None
  98.  
  99. Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
  100.  
  101.     Not done
  102.  
  103. Additions to the GLX Specification
  104.  
  105. GLX Protocol
  106.  
  107.     None
  108.  
  109. Errors
  110.  
  111.     None
  112.  
  113. New State
  114.  
  115.     Get Value                         Get Command Type Initial Value  Attrib
  116.     --------------------------------- ----------- ---- ------------- --------
  117.     LIGHT_MODEL_SPECULAR_VECTOR_APPLE GetBooleanv  B    False        lighting
  118.  
  119. New Implementation Dependent State
  120.  
  121.     None
  122.